<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>试卷列表</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <h1>试卷列表</h1>
    {% for exam in papers %}
    <div class="exam">
        <h2>{{ exam.title }}</h2>
        <p>{{ exam.description }}</p>
        <h3>题目列表:</h3>
        <ol> <!-- 使用有序列表显示题目 -->
            {% for question in exam.questions %}
            <li>
                <p>{{ question.question_text }}</p>
                <form method="post" action="{{ url_for('submit_answer', question_id=question.id) }}">
                    <div>
                        <input type="radio" id="option_a_{{ question.id }}" name="answer" value="A">
                        <label for="option_a_{{ question.id }}">{{ question.option_a }}</label>
                    </div>
                    <div>
                        <input type="radio" id="option_b_{{ question.id }}" name="answer" value="B">
                        <label for="option_b_{{ question.id }}">{{ question.option_b }}</label>
                    </div>
                    <div>
                        <input type="radio" id="option_c_{{ question.id }}" name="answer" value="C">
                        <label for="option_c_{{ question.id }}">{{ question.option_c }}</label>
                    </div>
                    <div>
                        <input type="radio" id="option_d_{{ question.id }}" name="answer" value="D">
                        <label for="option_d_{{ question.id }}">{{ question.option_d }}</label>
                    </div>
                </form>
            </li>
            {% endfor %}
        </ol>
    </div>
    {% endfor %}
</body>
</html>
